package com.info.zhiduoduo.admin.model.formbean.crowdsource;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.info.zhiduoduo.common.validator.ExcelDecimalValid;
import com.info.zhiduoduo.common.validator.ExcelValid;
import com.info.zhiduoduo.repository.dto.crowdsource.CrowdsourceItemAmountCalcResult;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ImportCrowdsourceProjectFormBean {

	@ExcelProperty(index = 0)
	@ApiModelProperty("序号")
	private int row;

	@ExcelProperty(index = 1)
	@ExcelValid(message = "项目名称不能为空")
	@ApiModelProperty("项目名")
	private String projectName;

	@ExcelProperty(index = 2)
	@ExcelValid(message = "项目描述不能为空")
	@ApiModelProperty("项目描述")
	private String projectDesc;

	@ExcelProperty(index = 3)
	@ExcelValid(message = "发票内容不能为空")
	@ApiModelProperty("发票内容")
	private String invoiceContent;

	@ExcelProperty(index = 4)
	@ExcelValid(message = "收款方姓名不能为空")
	@ApiModelProperty("创客姓名")
	private String name;

	@ExcelProperty(index = 5)
	@ExcelValid(message = "收款方账户不能为空")
	@ApiModelProperty("账户")
	private String acctno;

	@ExcelProperty(index = 6)
	@ExcelValid(message = "收款方身份证号码不能为空")
	@ApiModelProperty("自然人身份证")
	private String idno;

	@ExcelProperty(index = 7)
	@ExcelValid(message = "实发金额不能为空")
	@ExcelDecimalValid(min = "0", max = "50000", message = "单笔发单金额必须大于0，小于50,000.00元")
	@ApiModelProperty("自然人单笔金额")
	private BigDecimal itemAmount;

	@ExcelProperty(index = 8)
//	@ExcelProperty("本月累计金额(含税)(非必填)")
	@ApiModelProperty("本月累计金额")
	private String monthCumulativeMoney;

	@ExcelProperty(index = 9)
//	@ExcelProperty("本年度累计金额(含税)(非必填)")
	@ApiModelProperty("本年度累计金额")
	private String yearCumulativeMoney;

	//解析后新增字段
	//用户id
	@ExcelIgnore
	private Integer userId;
	//用户类型 1:众包自然人 2:众包工作室
	@ExcelIgnore
	private int userType;
	//姓名
	@ExcelIgnore
	private String realname;
	//工作室名称
	@ExcelIgnore
	private String username;
	//项目金额
	@ExcelIgnore
	private BigDecimal projectAmount;
	//项目计算结果
	@ExcelIgnore
	@JsonIgnore
	private CrowdsourceItemAmountCalcResult itemAmountCalc;

}
